Optimal. Leaf size=23 \[ \frac {1}{3} \log (1-\cos (x))-\frac {1}{3} \log (4-\cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3340, 630, 31}
\begin {gather*} \frac {1}{3} \log (1-\cos (x))-\frac {1}{3} \log (4-\cos (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 630
Rule 3340
Rubi steps
\begin {align*} \int \frac {\sin (x)}{4-5 \cos (x)+\cos ^2(x)} \, dx &=-\text {Subst}\left (\int \frac {1}{4-5 x+x^2} \, dx,x,\cos (x)\right )\\ &=-\left (\frac {1}{3} \text {Subst}\left (\int \frac {1}{-4+x} \, dx,x,\cos (x)\right )\right )+\frac {1}{3} \text {Subst}\left (\int \frac {1}{-1+x} \, dx,x,\cos (x)\right )\\ &=\frac {1}{3} \log (1-\cos (x))-\frac {1}{3} \log (4-\cos (x))\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 29, normalized size = 1.26 \begin {gather*} \frac {2}{3} \log \left (\sin \left (\frac {x}{2}\right )\right )-\frac {1}{3} \log \left (3+2 \sin ^2\left (\frac {x}{2}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 16, normalized size = 0.70
method | result | size |
derivativedivides | \(\frac {\ln \left (-1+\cos \left (x \right )\right )}{3}-\frac {\ln \left (\cos \left (x \right )-4\right )}{3}\) | \(16\) |
default | \(\frac {\ln \left (-1+\cos \left (x \right )\right )}{3}-\frac {\ln \left (\cos \left (x \right )-4\right )}{3}\) | \(16\) |
norman | \(\frac {2 \ln \left (\tan \left (\frac {x}{2}\right )\right )}{3}-\frac {\ln \left (5 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+3\right )}{3}\) | \(22\) |
risch | \(\frac {2 \ln \left ({\mathrm e}^{i x}-1\right )}{3}-\frac {\ln \left ({\mathrm e}^{2 i x}-8 \,{\mathrm e}^{i x}+1\right )}{3}\) | \(29\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 15, normalized size = 0.65 \begin {gather*} \frac {1}{3} \, \log \left (\cos \left (x\right ) - 1\right ) - \frac {1}{3} \, \log \left (\cos \left (x\right ) - 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 19, normalized size = 0.83 \begin {gather*} \frac {1}{3} \, \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - \frac {1}{3} \, \log \left (-\cos \left (x\right ) + 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.07, size = 15, normalized size = 0.65 \begin {gather*} - \frac {\log {\left (\cos {\left (x \right )} - 4 \right )}}{3} + \frac {\log {\left (\cos {\left (x \right )} - 1 \right )}}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 19, normalized size = 0.83 \begin {gather*} -\frac {1}{3} \, \log \left (-\cos \left (x\right ) + 4\right ) + \frac {1}{3} \, \log \left (-\cos \left (x\right ) + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.10, size = 9, normalized size = 0.39 \begin {gather*} \frac {2\,\mathrm {atanh}\left (\frac {2\,\cos \left (x\right )}{3}-\frac {5}{3}\right )}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________